package com.day9;

import java.util.TreeSet;

public class a {
    public static void main(String[] args) {
        TreeSet<Student> ts = new TreeSet<>();
        Student st1 = new Student("xiaomi", 97, 28);
        Student st2 = new Student("xiaofan", 98, 100);
        Student st3 = new Student("xiaozhan", 97, 29);
        ts.add(st1);
        ts.add(st2);
        ts.add(st3);
        for (Student t : ts) {
            System.out.println(t);
        }
    }
}
